class Task66:
    def run(self, array):
        length = len(array)
        if length == 0:
            return []

        result = [1 for _ in range(length)]
        result[-1] = array[-1]
        for i in reversed(range(length - 1)):
            result[i] = result[i + 1] * array[i]

        c = 1
        for i in range(length):
            if i + 1 < length:
                d = result[i + 1]
            else:
                d = 1
            result[i] = c * d
            c = c * array[i]
        return result
